$(function(){
	/*模拟注册登录环节*/
	if(window.sessionStorage){
		if(!sessionStorage.getItem('register')){
			sessionStorage.setItem('register',0);
		}
		if(sessionStorage.getItem('register')!=1){
			sessionStorage.setItem('register',1);
			skipUrl();
		}
		$('#logout').on('click',function(){
			sessionStorage.setItem('register',0);
			skipUrl();
		});
	}
	/*模拟状态跳转功能*/
	function skipUrl(){
			var url=location.href;
			if(url.search('pages')==-1){
				location.href='pages/register.html';
			}
			else{
				location.href='register.html';
			}
	}
	/*问题or文章跳转到详情*/
	$('.tab-panel').on('click',function(){
		location.href='articledetail.html';
	})
	$('.feeds').on('click',function(){
		location.href='pages/questiondetail.html';
	})
	$('.question').on('click',function(){
		location.href='questiondetail.html';
	})
	$('.article').on('click',function(){
		location.href='articledetail.html';
	})
})